package com.example.dormmanage.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@ApiModel("管理员实体类")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Admin implements Serializable {
    @ApiModelProperty("管理员id")
    @TableId(type = IdType.AUTO)
    private Long adminId;

    @ApiModelProperty("角色标识")
    private Long roleId;

    @ApiModelProperty("用户名")
    private String userName;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("账号状态")
    private String status;

    @ApiModelProperty("管理员姓名")
    private String realName;

    @ApiModelProperty("电话号码")
    private String phoneNumber;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT_UPDATE,select = false)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE,select = false)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "最后登录时间")
    @TableField(select = false)
    private LocalDateTime lastLoginTime;

}
